<!--
 * @Author: your name
 * @Date: 2021-05-27 22:29:40
 * @LastEditTime: 2021-06-04 11:14:17
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \tourismpc\src\views\community\components\education\index.vue
-->
<template>
  <div class="medical">
    <div class="culturalList">
      <div v-for="i in data" :key="i.medicalId" class="listItem" @click="goDetail(i.medicalId)">
        <div class="img">
          <img :src="i.medicalTitleUrl" alt />
        </div>
        <div class="text">
          <div class="hederText">
            <div class="title">{{ i.medicalName }}</div>
            <!-- <div class="price">
              <div>160RMB</div>
              <div>起</div>
            </div>-->
          </div>
          <div class="detailText">{{ i.medicalOrgLevelStr }}</div>
          <!-- <div class="addrees">
            <img style="width: 22px" src="../../../../assets/imgs/address.png" alt />
            ＜{{ i.distance }}km
          </div>-->
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Medical",
  props: {
    data: {
      type: Array,
      default: [],
    },
  },
  methods: {
    goDetail(medicalId) {
      this.$router.push({
        path: "/community/medical",
        query: {
          medicalId,
        },
      });
    },
  },
};
</script>

<style lang="less">
.medical {
  .culturalList {
    overflow: hidden;
  }
  .listItem {
    width: 380px;
    float: left;
    border: 1px solid #dddddd;
    margin-bottom: 30px;
    cursor: pointer;
    margin-right: 37px;
    &:nth-child(3n) {
      margin-right: 0;
    }
    .img {
      height: 280px;
      border-bottom: 1px solid #dddddd;
      img {
        width: 100%;
        height: 100%;
      }
    }
    .text {
      .hederText {
        padding: 22px 11px 14px 11px;
        overflow: hidden;
        .title {
          float: left;
          height: 28px;
          display: flex;
          align-items: flex-end;
          margin-bottom: -4px;
          color: #333333;
        }
        .price {
          float: right;
          display: flex;
          div {
            &:nth-child(1) {
              font-size: 24px;
              color: #f44a22;
              margin-bottom: -4px;
              margin-right: 2px;
            }
            &:nth-child(2) {
              display: flex;
              align-items: flex-end;
              color: #333333;
            }
          }
        }
      }
      .detailText {
        margin: 0 22px 14px 22px;
        font-size: 14px;
        max-height: 58px;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #666666;
      }
      .addrees {
        color: #666666;
        margin: 11px 11px 8px 11px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
      }
    }
  }
}
</style>
